import request from '@/utils/request'

// 查询告警规则触发器列表
export function listTrigger(query) {
  return request({
    url: '/biz/trigger/list',
    method: 'get',
    params: query
  })
}

// 查询告警规则触发器详细
export function getTrigger(id) {
  return request({
    url: '/biz/trigger/' + id,
    method: 'get'
  })
}

// 新增告警规则触发器
export function addTrigger(data) {
  return request({
    url: '/biz/trigger',
    method: 'post',
    data: data
  })
}

// 修改告警规则触发器
export function updateTrigger(data) {
  return request({
    url: '/biz/trigger',
    method: 'put',
    data: data
  })
}

// 删除告警规则触发器
export function delTrigger(id) {
  return request({
    url: '/biz/trigger/' + id,
    method: 'delete'
  })
}

// 导出告警规则触发器
export function exportTrigger(query) {
  return request({
    url: '/biz/trigger/export',
    method: 'get',
    params: query
  })
}